6d1ffb01d9169de6552b2ea66adef3fe1b502dc6,src/net/sourceforge/kolmafia/webui/FightDecorator.java,FightDecorator,decorateFallsFromSky,#StringBuffer#,297
Before Change
private static final void decorateFallsFromSky( final StringBuffer buffer )
{
if ( buffer.indexOf( "begins to spin in a circle" ) != -1 )
{
FightDecorator.selectSkill( buffer, "Hide Under a Rock" );
return;
After Change
//
// Only the last one determines the correct response.
int circle = buffer.lastIndexOf( "begins to spin in a circle" );
int paw = buffer.lastIndexOf( "begins to paw at the ground" );
int shuffle = buffer.lastIndexOf( "shuffles toward you" );
if ( circle > paw && circle > shuffle )
{
FightDecorator.selectSkill( buffer, "Hide Under a Rock" );
return;
}
if ( paw > circle && paw > shuffle )
{
FightDecorator.selectSkill( buffer, "Dive Into a Puddle" );
return;
}
if ( shuffle > circle && shuffle > paw )
{
FightDecorator.selectSkill( buffer, "Hide Behind a Tree" );
return;